In-Line Digital Holographic Reconstruction by Using GPU Programming with Python
In-Line Digital Holographic Reconstruction by Using GPU Programming with Python

Dai NAKAI, Yohsuke TANAKA
Advanced Experimental Mechanics
Advanced Experimental Mechanics, Vol. 7, 169-173. – Published 10 August 2022; doi:https://doi.org/10.11395/aem.7.0_169



Abstract

The computation of holographic reconstruction in digital holography has been accelerated by graphics processing units (GPUs). CUDA is an extension of the C/C++ language for GPU programming and is widely used for its performance and accessibility. However, CUDA is difficult to implement for beginners due to its memory management, hardware execution unit declarations, and kernel definitions. In this study, we used CuPy, a GPU computation library for Python, to reimplement the holographic reconstruction algorithm in Python and to compare it with the CUDA implementation. The Python implementation was only 70 lines, less than a third of the CUDA implementation. In addition, holographic reconstruction on a GPU in Python was approximately 20 times faster than a CPU implemented in C++, but approximately 2.5 times slower than the execution on the GPU implemented in CUDA. Our results demonstrate the usefulness of Python with CuPy for implementing and executing image measurement processes on GPUs.


BACK
© Measurement System Laboratory, Kyoto Institute of Technology.